<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
	    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	    <title>鼓励金</title>
		<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
		<link rel="stylesheet" href="__INDEX__/css/style.css" />
		<link rel="stylesheet" href="__INDEX__/css/mall.css" />	
		<style type="text/css">
			canvas{width: 200px; height: 200px;}
		</style>
	</head>
	<body style="background: #FCC431;">		
		<div class="erweima_con">
			<div class="czewm_con" id='payment_conbox'>
				<div class="czewm_top">
					<p><img src="__INDEX__/images/czewm.jpg"></p>
					<p class="num">购买￥<em>{$much}</em>获得<em>{$much*$ratio}</em>鼓励金</p>
				</div>
				<div class="fxewm_box czewm_box" >
					<div class="czewm_ewmbox">
						<div class="fxerweim" style="width: 200px; height: 200px; border: unset">
							<div id="qrcode"></div>
						</div>
					</div>
				</div>
				<div><img src="__INDEX__/images/czewm3.jpg"></div>
			</div>
			<div id ='cut_img'></div>
		</div>
	</body>
</html>
<script type="text/javascript" src="__PUBLIC__/static/js/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/static/layui/layui.all.js"></script>
<script type="text/javascript" src="__PUBLIC__/static/js/jquery.form.js"></script>
<script type="text/javascript" src="__PUBLIC__/static/js/jquery.qrcode.js"></script>
<script type="text/javascript" src="__PUBLIC__/static/js/utf.js"></script>
<script type="text/javascript" src="__PUBLIC__/static/js/zepto-1.1.6.min.js"></script>
<script type="text/javascript" src='__PUBLIC__/static/js/html2canvas.js'></script>
<script>
	var index = layer.load(0, {shade: false,time: 1.5 * 1000});
	$(".layui-layer-loading").css("left", "50%");
	var url = "{$cut_url}";
	 $("#qrcode").qrcode({
        render 		: "canvas",    		//设置渲染方式，有table和canvas，使用canvas方式渲染性能相对来说比较好
        text 		: url,    		//扫描二维码后显示的内容,可以直接填一个网址，扫描二维码后自动跳向该链接
        width 		: "250",    	//二维码的宽度
        height 		: "250",    	//二维码的高度
        background 	: "#ffffff",    //二维码的后景色
        foreground 	: "#000000",    //二维码的前景色
        src			: "/public/static/logo/1/logo.png"  			//二维码中间的图片
    });
   setTimeout(function(){
		html2canvas($("#payment_conbox"), {
			 onrendered: function (canvas) {
			     var url = canvas.toDataURL(); //base64数据
			     var image = new Image();
			     image.src = url;
			     image.id = 'div_img';
			     $('#cut_img').append(image);
			   }
			});
	},1000);
	setTimeout(function(){
		$("#payment_conbox").hide();
	},1100);
</script>
